package com.pi.wms.repository;

import com.pi.framework.core.repository.IBaseRepository;
import com.pi.wms.entity.TwiInventoryXwmsDetails;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface XwmsInventoryDetailsRepository extends IBaseRepository<TwiInventoryXwmsDetails, Long>{

	@Query("from TwiInventoryXwmsDetails ")
	List<TwiInventoryXwmsDetails> findAll();

/**
	@Query("from VwaInventoryStorageList t where t.materialId=:materialId and qty>0 ")
	List<VwaInventoryStorageList> findByMaterialId(@Param("materialId") Long materialId);
**/

    @Modifying
    @Query("delete from TwiInventoryXwmsDetails where divisionId=:divisionId ")
    int clean(@Param("divisionId") Long divisionId);


}
